<template>
  <div class="welcome-page">
    <!-- 统计卡片区域 -->
    <el-row :gutter="20" class="stat-row">
      <!-- 学生总数卡片 -->
      <el-col :span="6">
        <el-card shadow="hover" class="stat-card">
          <div class="stat-icon student-icon">
            <i class="el-icon-user-solid"></i>
          </div>
          <div class="stat-content">
            <div class="stat-number">2910人</div>
            <div class="stat-label">学生总数</div>
          </div>
        </el-card>
      </el-col>

      <!-- 教师总数卡片 -->
      <el-col :span="6">
        <el-card shadow="hover" class="stat-card">
          <div class="stat-icon teacher-icon">
            <i class="el-icon-s-custom"></i>
          </div>
          <div class="stat-content">
            <div class="stat-number">120人</div>
            <div class="stat-label">教师总数</div>
          </div>
        </el-card>
      </el-col>

      <!-- 课程总数卡片 -->
      <el-col :span="6">
        <el-card shadow="hover" class="stat-card">
          <div class="stat-icon course-icon">
            <i class="el-icon-reading"></i>
          </div>
          <div class="stat-content">
            <div class="stat-number">420门</div>
            <div class="stat-label">课程总数</div>
          </div>
        </el-card>
      </el-col>

      <!-- 选课记录卡片 -->
      <el-col :span="6">
        <el-card shadow="hover" class="stat-card">
          <div class="stat-icon selection-icon">
            <i class="el-icon-s-order"></i>
          </div>
          <div class="stat-content">
            <div class="stat-number">324次</div>
            <div class="stat-label">选课记录</div>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <!-- 图表区域 -->
    <el-row :gutter="20" class="chart-row">
      <!-- 课程类型分布饼图 -->
      <el-col :span="12">
        <el-card shadow="hover">
          <div slot="header">
            <span>课程类型分布</span>
          </div>
          <div ref="courseTypeChart" class="chart-container"></div>
        </el-card>
      </el-col>

      <!-- 每月选课趋势折线图 -->
      <el-col :span="12">
        <el-card shadow="hover">
          <div slot="header">
            <span>每月选课趋势</span>
          </div>
          <div ref="monthlyTrendChart" class="chart-container"></div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "WelcomePage",
  data() {
    return {
      message: "欢迎页面",
    };
  },
  mounted() {
    console.log("WelcomePage mounted");
  },
};
</script>

<style lang="scss" scoped>
.welcome-page {
  text-align: center;
}
</style>
